﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Testowanie
{
    public partial class Form2 : Form
    {
        Form1 f; 
        string imie;
        public Form2(Form1 f)
        {
            this.f = f; 
            InitializeComponent();
           // f.dRow = f.MyDataSet.Tables["Workers"].Rows[f.wiersz];
           // textBox1.Text = f.dRow.ItemArray.GetValue(1).ToString();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
          //  f.dRow = f.MyDataSet.Tables["Auto"].Rows[f.wiersz];
            
           // textBox1.Text = f.dRow.ItemArray.GetValue(f.kolumna).ToString();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
           // textBox1.Text = f.dRow.ItemArray.GetValue(0).ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            f.dRow[0] = textBox1.Text;
            f.dRow[1] = textBox2.Text;
            f.MyDataSet.Tables["Auto"].Rows.Add(f.dRow);
            f.da.Update(f.MyDataSet, "Auto");
           // f.MyListBox.Items.Add(imie);
            this.Close();
        }
    }
}
